import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/home',
  },
  {
    path: '/home',
    component: () => import('../views/Home.vue')
  },
  {
    path: '/products',
    component: () => import('../views/Products.vue')
  },
  // {
  //   path: '/add',
  //   component: () => import('../views/Add.vue')
  // },
  // {
  //   path: '/edit',
  //   component: () => import('../views/edit.vue')
  // },
  {
    path: '/add',
    component: () => import('../components/com.vue')
  },
  {
    path: '/edit',
    component: () => import('../components/com.vue')
  },
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
